<?php

/*
 * \brief This class builds the html content for the login window.
 * \author Salman Noor
 */
class login_window_registration
{
    /**
     * \brief Object to be able use the html_builder class functionality.
     */
    private $html_buillder;

     /**
     * \brief Constructor to initialise mata members of the class
     * login_window_registration.
     */
    public function  __construct() {
        $this->html_buillder = new html_elements_builder();
    }



    /**
     * \brief Builds html content for the login window.
     * return Returns the html content for the login window.
     */
    private function buildLoginWindow()
    { 
        $loginWindow = "<div id='leftColumn' class='ui-widget-content ui-corner-all'style='border:1px solid #CCCCCC;padding:20px 20px 20px 20px; float:left;'> ";
        $loginWindow .=  "<div class='ui-widget-content ui-corner-all'style='border:1px solid #CCCCCC;padding:5px 50px 5px 100px;'> ".
        $this->html_buillder->buildButton("regButton","Register","registerButton")."</div><br>";
        $loginWindow .="<div style =' border: 1px solid transparent; padding: 7px' class='errorMessageDiv'> </div>";
        $loginWindow .="<div id='loginResponseDiv'> </div>";
        $loginWindow .= $this->html_buillder->buildTextInput('loginName', null, 'loginName', TRUE, "User Name",'top') . "<br>";
        $loginWindow .= $this->html_buillder->buildPasswordInput('loginPassword', null, 'loginPassword', TRUE, "Password",'top') . "<br>";
        $this->html_buillder->addOption('customer', 'Customer User');
        $this->html_buillder->addOption('business', 'Business User');
        $this->html_buillder->setSelected('customer');
        $loginWindow .= $this->html_buillder->buildRadioButton('loginType', "Login as:")."<br>";
        $loginWindow .=  $this->html_buillder->buildButton("loginButton","Login","loginButton");
        $loginWindow .= "</div>";
        return $loginWindow;
    }


     /**
     * \brief Builds html content for the login window.
     * return Returns the html content for the login window for display.
     */
    public function showLoginWindow()
    {
        return $this->buildLoginWindow();
    }
}
?>
